flowchart TD
  n10["Back to Function Level"]
  n12["First Header"]
  n13["Second Header"]
  n23["Final Section"]
  subgraph sg0["你好世界"]
    direction TB
    subgraph sg1["Émojis 🎉🎊"]
      direction TB
      n0["Special «Characters» ™"]
    end
  end
  subgraph sg2["Level 1"]
    direction TB
    subgraph sg3["Level 2"]
      direction TB
      subgraph sg4["Level 3"]
        direction TB
        subgraph sg5["Level 4"]
          direction TB
          subgraph sg6["Level 5"]
            direction TB
            subgraph sg7["Level 6"]
              direction TB
              subgraph sg8["Level 7 - More than 6 levels"]
                direction TB
                subgraph sg9["Level 8"]
                  direction TB
                  n1["Level 9"]
                end
              end
            end
          end
        end
      end
    end
  end
  subgraph sg10["Extra Spaces Before Title"]
    direction TB
    subgraph sg11["Mixed Tabs And Spaces"]
      direction TB
      n2["All Tabs"]
    end
  end
  subgraph sg12["Trailing Spaces"]
    direction TB
    n3["Multiple  Spaces  Between  Words"]
  end
  subgraph sg13["Header Before Comment"]
    direction TB
    subgraph sg14["Header After Comment"]
      direction TB
      n4["Header After Doc Comment"]
    end
  end
  subgraph sg15["Main Function"]
    direction TB
    n9["Back to Block Level"]
    subgraph sg16["Inside Block Expression"]
      direction TB
      n5{"Inside Block Expression"}
      class n5 decisionNode;
      n7["Back to If Level"]
      n8["Inside Else"]
      subgraph sg17["Inside If True"]
        direction TB
        n6["Very Deep Block"]
      end
    end
  end
  subgraph sg18["Header-With-Dashes"]
    direction TB
    subgraph sg19["Header_With_Underscores"]
      direction TB
      subgraph sg20["Header.With.Dots"]
        direction TB
        subgraph sg21["Header/With/Slashes"]
          direction TB
          subgraph sg22["Header\With\Backslashes"]
            direction TB
            n11["Header|With|Pipes"]
          end
        end
      end
    end
  end
  subgraph sg23["Third Header"]
    direction TB
    n14["Subsection A"]
    n15["Subsection B"]
    n16["Subsection C"]
  end
  subgraph sg24["Before Let"]
    direction TB
    n22["After For"]
    subgraph sg25["After Let"]
      direction TB
      n20["After If"]
      subgraph sg26["Before If"]
        direction TB
        n17{"Before If"}
        class n17 decisionNode;
        n18["Inside If"]
        n19["Inside Else"]
      end
    end
    subgraph sg27["Before For"]
      direction TB
      n21["Inside For"]
    end
  end
  subgraph sg28["This Is An Extremely Long Header Title That Goes On And On And On And Contains Many Words To Test How The Parser Handles Very Long Header Titles That Might Span Multiple Lines In Some Editors But Should Still Be Parsed As A Single Header"]
    direction TB
    n24["Another Long Title With Special Characters !@#$%^&*()_+-=[]{}|;':&quot;,./<>? And Numbers 1234567890"]
  end
  subgraph sg29["Just Headers"]
    direction TB
    subgraph sg30["No Code"]
      direction TB
      subgraph sg31["Only Documentation"]
        direction TB
        subgraph sg32["Pure Annotation"]
          direction TB
          subgraph sg33["No Expressions"]
            direction TB
            n25["Until The End"]
          end
        end
      end
    end
  end
  n5 --> n6
  n5 --> n8
  n14 --> n15
  n15 --> n16
  n17 --> n18
  n17 --> n19
  n18 --> n20
  n19 --> n20
  n20 --> n21
  n21 --> n22
  n2 --> n3
  n9 --> n10
  n6 --> n9
  n8 --> n9
  n6 --> n7
  n12 --> n13
  n13 --> n14
  n22 --> n23
%%__BAML_SPANMAP__={"n0":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":9,"start":4,"end_line":9,"end":32},"n1":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":23,"start":0,"end_line":23,"end":23},"n2":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":31,"start":0,"end_line":31,"end":20},"n3":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":36,"start":0,"end_line":36,"end":41},"n4":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":51,"start":0,"end_line":51,"end":34},"n5":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":60,"start":8,"end_line":60,"end":36},"n6":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":66,"start":16,"end_line":66,"end":38},"n7":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":70,"start":12,"end_line":70,"end":34},"n8":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":73,"start":12,"end_line":73,"end":29},"n9":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":77,"start":8,"end_line":77,"end":32},"n10":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":81,"start":4,"end_line":81,"end":30},"n11":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":91,"start":0,"end_line":91,"end":30},"n12":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":97,"start":4,"end_line":97,"end":20},"n13":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":98,"start":0,"end_line":98,"end":21},"n14":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":101,"start":4,"end_line":101,"end":21},"n15":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":102,"start":0,"end_line":102,"end":21},"n16":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":103,"start":0,"end_line":103,"end":21},"n17":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":113,"start":4,"end_line":113,"end":19},"n18":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":115,"start":8,"end_line":115,"end":24},"n19":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":118,"start":8,"end_line":118,"end":26},"n20":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":121,"start":4,"end_line":121,"end":18},"n21":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":125,"start":8,"end_line":125,"end":24},"n22":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":128,"start":4,"end_line":128,"end":18},"n23":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":130,"start":4,"end_line":130,"end":21},"n24":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":137,"start":4,"end_line":137,"end":104},"n25":{"file_path":"tests/validation_files/headers/edge_cases.baml","start_line":148,"start":0,"end_line":148,"end":26}}
  click n0 call bamlMermaidNodeClick() "Go to source"
  click n1 call bamlMermaidNodeClick() "Go to source"
  click n2 call bamlMermaidNodeClick() "Go to source"
  click n3 call bamlMermaidNodeClick() "Go to source"
  click n4 call bamlMermaidNodeClick() "Go to source"
  click n5 call bamlMermaidNodeClick() "Go to source"
  click n6 call bamlMermaidNodeClick() "Go to source"
  click n7 call bamlMermaidNodeClick() "Go to source"
  click n8 call bamlMermaidNodeClick() "Go to source"
  click n9 call bamlMermaidNodeClick() "Go to source"
  click n10 call bamlMermaidNodeClick() "Go to source"
  click n11 call bamlMermaidNodeClick() "Go to source"
  click n12 call bamlMermaidNodeClick() "Go to source"
  click n13 call bamlMermaidNodeClick() "Go to source"
  click n14 call bamlMermaidNodeClick() "Go to source"
  click n15 call bamlMermaidNodeClick() "Go to source"
  click n16 call bamlMermaidNodeClick() "Go to source"
  click n17 call bamlMermaidNodeClick() "Go to source"
  click n18 call bamlMermaidNodeClick() "Go to source"
  click n19 call bamlMermaidNodeClick() "Go to source"
  click n20 call bamlMermaidNodeClick() "Go to source"
  click n21 call bamlMermaidNodeClick() "Go to source"
  click n22 call bamlMermaidNodeClick() "Go to source"
  click n23 call bamlMermaidNodeClick() "Go to source"
  click n24 call bamlMermaidNodeClick() "Go to source"
  click n25 call bamlMermaidNodeClick() "Go to source"